package jmu.cyxwcy.librarymanagement.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import jmu.cyxwcy.librarymanagement.pojo.Book;
import jmu.cyxwcy.librarymanagement.pojo.Borrowing;
import jmu.cyxwcy.librarymanagement.mapper.BorrowingMapper;
import jmu.cyxwcy.librarymanagement.service.IBorrowingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2024-06-25
 */
@Service
public class BorrowingServiceImpl extends ServiceImpl<BorrowingMapper, Borrowing> implements IBorrowingService {

    @Autowired
    private BorrowingMapper borrowingMapper ;
    @Override
    public IPage<Borrowing> join(IPage<Borrowing> page, MPJLambdaWrapper<Borrowing> queryWrapper) {
        return borrowingMapper.selectJoinPage(page, Borrowing.class, queryWrapper);
    }

    @Override
    public void updateReturnDate(Integer borrowingId) {
        borrowingMapper.updateReturnDate(borrowingId);
    }
}
